SRCS:=$(wildcard *.c)
OBJS:=$(patsubst %.c,%.o,$(SRCS))
ELF:=server
CC:=gcc
CFLAGS:=-g -Wall -I /usr/include/mysql/ -L /usr/lib64/mysql/ -lmysqlclient -std=c99 -lpthread -lcrypt -D _XOPEN_SOURCE=600
$(ELF):$(OBJS)
	gcc -o $@ $^ $(CFLAGS)
clean:
	rm -rf $(OBJS) $(ELF)
#-L /usr/lib64/mysql/
#修改环境变量LD_LIBRARY_PATH没起作用
